﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="MoreDetails.aspx.vb" Inherits="Haunted.HauntedLocationsInfo" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
   

        <br />
       <asp:GridView ID="GridView3" runat="server" 
            AutoGenerateColumns="False" DataSourceID="SqlDataSource1picture">
            <Columns>
                <asp:ImageField DataImageUrlField="Picture" HeaderText="Picture">
                </asp:ImageField>
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1picture" runat="server" 
            ConnectionString="<%$ ConnectionStrings:HauntedLocationString %>" 
            ProviderName="<%$ ConnectionStrings:HauntedLocationString.ProviderName %>" 
            SelectCommand="SELECT [Picture] FROM [HauntedLocations] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    <p>
        <asp:GridView ID="GridView4" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource1info">
            <Columns>
                <asp:BoundField DataField="LocationName" HeaderText="LocationName" 
                    SortExpression="LocationName" />
                <asp:BoundField DataField="Type" HeaderText="Type" SortExpression="Type" />
                <asp:BoundField DataField="Address" HeaderText="Address" 
                    SortExpression="Address" />
                <asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />
                <asp:BoundField DataField="State" HeaderText="State" SortExpression="State" />
                <asp:BoundField DataField="ZipCode" HeaderText="ZipCode" 
                    SortExpression="ZipCode" />
                <asp:BoundField DataField="Coutry" HeaderText="Country" 
                    SortExpression="Coutry" />
                <asp:HyperLinkField DataNavigateUrlFields="Website" 
                    DataNavigateUrlFormatString="{0}" DataTextField="LocationName" 
                    HeaderText="Website" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1info" runat="server" 
            ConnectionString="<%$ ConnectionStrings:HauntedLocationString %>" 
            ProviderName="<%$ ConnectionStrings:HauntedLocationString.ProviderName %>" 
            SelectCommand="SELECT [LocationName], [Type], [Address], [City], [State], [ZipCode], [Coutry], [Website] FROM [HauntedLocations] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        <asp:GridView ID="GridView5" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource1Description">
            <Columns>
                <asp:BoundField DataField="Description" HeaderText="Description" 
                    SortExpression="Description" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1Description" runat="server" 
            ConnectionString="<%$ ConnectionStrings:HauntedLocationString %>" 
            ProviderName="<%$ ConnectionStrings:HauntedLocationString.ProviderName %>" 
            SelectCommand="SELECT [Description] FROM [HauntedLocations] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        </asp:ToolkitScriptManager>

        <br />

              <p>
            <asp:DropDownList ID="Tags" runat="server" DataSourceID="SqlDataSource3" 
                DataTextField="Tag" DataValueField="ID">
            </asp:DropDownList>
            <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
                ConnectionString="<%$ ConnectionStrings:HauntedLocationString %>" 
                ProviderName="<%$ ConnectionStrings:HauntedLocationString.ProviderName %>" 
                SelectCommand="SELECT [ID], [Tag] FROM [Tags]"></asp:SqlDataSource>
</p>
    <p>
        <asp:TextBox ID="tb_newtag" runat="server"></asp:TextBox>
    &nbsp;New tags seperated by coma</p>
    <p>
        <asp:Button ID="btn_tag" runat="server" Text="Add Tag" style="height: 26px" />
    </p>
    <p>
        &nbsp;</p>
        <p>
            <asp:GridView ID="GridView6" runat="server" AutoGenerateColumns="False" 
                DataKeyNames="ID" DataSourceID="SqlDataSource2">
                <Columns>
                    <asp:BoundField DataField="LocationName" HeaderText="LocationName" 
                        SortExpression="LocationName" />
                    <asp:HyperLinkField DataNavigateUrlFields="ID" 
                        DataNavigateUrlFormatString="Rate.aspx?ID={0}" HeaderText="Rate" Text="Rate" />
                </Columns>
            </asp:GridView>
            <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                ConnectionString="<%$ ConnectionStrings:HauntedLocationString %>" 
                ProviderName="<%$ ConnectionStrings:HauntedLocationString.ProviderName %>" 
                SelectCommand="SELECT [ID], [LocationName] FROM [HauntedLocations] WHERE ([ID] = ?)">
                <SelectParameters>
                    <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
                </SelectParameters>
            </asp:SqlDataSource>
        </p>
        <p>
    


    <div style="overflow:auto;height:300px">
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource1comments" style="margin-right: 1px">
            <Columns>
                <asp:TemplateField HeaderText="Comments">
                
                <ItemTemplate>

                <div style= "background-color:Silver">

                <span style = "background-color:Yellow" </span>
                <%# Eval("Author") %> </span><br />
                <%# Eval("Subject")%> <br />
                <%# Eval("Comment")%> <br />

                </div>

                </ItemTemplate>

                <AlternatingItemTemplate>

                <div style= "background-color:White">

                <span style = "background-color:Yellow" <br />
                <%# Eval("Author") %> </span> <br />
                <%# Eval("Subject") %> <br />
                <%# Eval("Comment")%> <br />

                </div>

                </AlternatingItemTemplate>

                    <ControlStyle Width="150px" />

                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        </div>
        <asp:SqlDataSource ID="SqlDataSource1comments" runat="server" 
            ConnectionString="<%$ ConnectionStrings:HauntedLocationString %>" 
            ProviderName="<%$ ConnectionStrings:HauntedLocationString.ProviderName %>" 
            SelectCommand="SELECT [Author], [Subject], [Comment] FROM [Comments] WHERE ([HauntedLocations_fkid] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="HauntedLocations_fkid" QueryStringField="ID" 
                    Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
       
    <p>
       <b> Add comment&nbsp; </b>
        <asp:LoginName ID="LoginName1" runat="server" />
        </p>
    <p>
        &nbsp;Subject</p>
    <p>
        <asp:TextBox ID="tb_Subject" runat="server" Width="300px"></asp:TextBox>
    </p>
    <p>
        Comment</p>
    <p>
        <asp:TextBox ID="tb_Comment" runat="server" Height="200px" Width="300px"></asp:TextBox>
    </p>
    <p>
        <asp:Button ID="btn_comment" runat="server" Text="Submit Comment" />
    </p>
</asp:Content>
